package com.gqc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gqc.bean.Order;
import com.gqc.dao.OrderMapper;

@Service
public class OrderService {

	@Autowired
	OrderMapper orderMapper;
	public void addOrder(Order order) {
		orderMapper.insert(order);
	}
	//商家查询订单
    public List<Order> findOrderByBusiness(int id){
    	return orderMapper.findOrderByBusiness(id);
    }
    //送货
    public void sendFood(int id) {
    	orderMapper.sendFood(id);
    }
    //接受订单
    public void getOrder(int id) {
    	orderMapper.getOrder(id);
    }
    //客户查询订单
 
    public List<Order> findOrderByUser(int id){
    	return orderMapper.findOrderByUser(id);
    }
}
